package com.ganmiao.exception;


import com.ganmiao.resp.ResponseCode;

public class ExceptionResponse
{
    private Integer code;
    
    private String desc;
    
    public ExceptionResponse(Integer code, String message)
    {
        this.desc = message;
        this.code = code;
    }
    
    public ExceptionResponse(AbstractBusinessException exception)
    {
        this.code = exception.getResponseCode();
        this.desc = exception.getMessage();
    }
    
    public ExceptionResponse(ResponseCode rs)
    {
        this.code = rs.getCode();
        this.desc = rs.getDesc();
    }
    
    public Integer getCode()
    {
        return code;
    }
    
    public String getDesc()
    {
        return desc;
    }
    
}
